import React, { Component } from 'react';
import { connect } from 'dva';
import {
  Button, Menu, Dropdown, Icon, Row, Col,
  Input, InputNumber,
  Steps, Card, Popover, Badge, Table, Tooltip, Divider,
  Checkbox, Modal, Radio, Collapse,
  Select, message,
  Form, Upload, Spin, DatePicker
} from 'antd';

const FormItem = Form.Item;
const Panel = Collapse.Panel;
const RadioGroup = Radio.Group;
const { TextArea } = Input;

export default class Description extends Component {
  columns = [
    {
      title: '等级类型',
      dataIndex: 'class',
      key: 'class',
      width: '15%',
      render: (text, row, index) => {
        const obj = {
          children: text,
          props: {},
        };
        if (index === 0) {
          obj.props.rowSpan = 2;
        }
        //合并到上一行
        if (index === 1) {
          obj.props.rowSpan = 0;
        }
        if (index === 2) {
          obj.props.rowSpan = 3;
        }
        if (index === 3 || index === 4) {
          obj.props.rowSpan = 0;
        }
        if (index === 5) {
          obj.props.rowSpan = 3;
        }
        if (index === 6 || index === 7) {
          obj.props.rowSpan = 0;
        }
        return obj;
      },
    }, {
      title: '描述',
      dataIndex: 'content',
      key: 'content',
    },
  ];

  data = [
    {
      key: '01',
      class: 'A类',
      content: '1.签协议合作品牌4S店。',
    },
    {
      key: '02',
      class: '',
      content: '2.有销售展厅，有营业执照汽车销售公司。',
    },
    {
      key: '03',
      class: 'B类',
      content:
        '1.只有展厅（展位）或者只有营业执照销售公司，提供展厅照片或营业执照复印件，打款人身份证与卡号复印件备案。',
    },
    {
      key: '04',
      class: '',
      content:
        '2.品牌授权4S店工作人员（销售顾问、销售主管、销售经理等），经核实后提供个人名片备案、有指定卡垫付车款，并且取回打款凭证和刷卡凭证。',
    },
    {
      key: '05',
      class: '',
      content: '3.签协议的个人代理商、提供身份证与打款卡号备案。',
    },
    ,
    {
      key: '06',
      class: 'C类',
      content:
        '1.无展厅与营业执照，曾经从事过汽车销售工作、打款必须打到开票单位，或客户经理陪同提车耍刷卡、取回刷卡凭证、提车后取回车辆发票原件与合格证原件、公司统一上牌。',
    },
    ,
    {
      key: '07',
      class: '',
      content: '2.其他汽车按揭担保公司飞单、打款必须打到开票单位。',
    },
    ,
    {
      key: '08',
      class: '',
      content:
        '3.无特别备案的散单、打算必须打到开票单位，或者客户经理陪同提车刷卡，取回刷卡凭证，提车后取回车辆发票原件与合格证原件，公司统一上牌。',
    },
  ];

  render() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={this.columns}
        dataSource={this.data}
        bordered
        size="small"
      />
    );
  }

}